<template>
    <view class="globe_back">
        <view class="box">
            <view class="flex card">
                <view class="title">持卡人姓名</view>
                <view>
                    <input type="text" v-model="formData.name" placeholder="请填写持卡人姓名" />
                </view>
            </view>
            <u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="cancel"></u-picker>
            <view class="flex card">
                <view class="title">开户银行</view>
                <view @click="show == true">
                    <input type="text" disabled placeholder="请选择开户行" v-model="bank" />
                </view>
            </view>
            <view class="flex card">
                <view class="title">银行卡号</view>
                <view>
                    <input type="text" v-model="formData.number" placeholder="请填写持卡人银行卡号" />
                </view>
            </view>
            <view class="flex card">
                <view class="title">预留手机号</view>
                <view>
                    <input type="text" v-model="formData.phone" placeholder="请填写银行预留手机号" />
                </view>
            </view>
            <view class="addBtn back_3377FF br_24 cl_fff mt_24">确认</view>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            show: false,
            columns: [['某某支行', '某某支行1', '某某支行2']],
            formData: {
                name: '',
                number: '',
                bank: '',
                phone: ''
            }
        };
    },
    methods: {
        cancel() {
            this.show = false;
        },
        confirm(e) {
            console.log(e.value[0]);
            this.show = false;
            this.bank = e.value[0];
        }
    }
};
</script>

<style scoped lang="scss">
.box {
    padding: 32rpx;
    .card {
        background: white;
        font-size: 28rpx;
        border-radius: 24rpx;
        padding: 24rpx;
        .title {
            width: 148rpx;
            margin-right: 20rpx;
        }
    }
    .addBtn {
        width: 686rpx;
        height: 100rpx;
        line-height: 100rpx;
        text-align: center;
        margin: 24px auto;
        position: fixed;
        bottom: 80rpx;
    }
}
</style>
